<include file="Public:header" />

<script>
function del(id){
	if(id)
	{
	  if(confirm("Delete?")){ 
	    location="__URL__/delete/pid/"+id;
      }
	}
}
</script>

 <include file="Public:left_menu" />  
 
<div id="content">
<h2>
	<eq name="Think.get.type" value="1">My Supply Products</eq>
	<eq name="Think.get.type" value="2">My Demand Products</eq>    
</h2>

	<!--  内容列表   -->
        <form name="form2" style="margin-bottom:0px;">
        
        
        
        
        <table class="list_table" width="98%" border="0" cellpadding="2" cellspacing="1"  align="left" >
           
            <tr align="center"  height="28">
                <th width="8%">ID</th>
                <th width="5%">User ID</th>
                <th width="13%">Product Name</th>
                <th width="13%">Price</th>
                <th width="13%">Quantity</th>
                <th width="14%">Type</th>
                <th width="10%">Option</th>
                <th width="10%">Language List</th>
            </tr>
            
            <foreach name="data.tb_products" item="vo" >
            <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" >
                <td>{$vo.pid}</td>
                <td>{$vo.user_id}</td>
                <td>{$vo.name}</td>
                <td>{$vo.price}</td>
                <td>{$vo.quantity}</td>
                <td><if condition="$vo.type eq 1">Supply</if><if condition="$vo.type eq 2">Demand</if></td>
                <td>
                    <a href="__URL__/edit/pid/{$vo.pid}">Update</a> | 
                    <a href="javascript:del({$vo.pid})">Delete</a>
                </td>
                <td>
                	<a href="__URL__/lang_index/product_id/{$vo.pid}">List</a>
                </td>
            </tr>
            </foreach>
            <tr>
            <td height="28" colspan="10">
                {$msg.page}
            </td>
            </tr>
        </table>
    </form>
    
    <a href="__URL__/add<?php if(!empty($_GET['type'])) echo '/type/'.$_GET['type']; ?>" class="btn1 r3"><span class="r3">Add Product</span></a>
    
</div>
<include file="Public:footer" />